package com.zabra.zl.ui.index_fragment.index;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.zabra.zl.R;
import com.zabra.zl.data.IndexMenuBean;

import java.util.List;

public class IndexMenuAdapter extends BaseQuickAdapter<IndexMenuBean, BaseViewHolder> {
    public IndexMenuAdapter(int layoutResId, @Nullable List<IndexMenuBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, IndexMenuBean item) {
        helper.setText(R.id.item_text, item.getmText())
                .setImageResource(R.id.item_img, item.getmIcon());
    }
}
